import { BaseEntity } from '../../base/entity/base';
import { Column, Entity, Index } from 'typeorm';

/**
 * 促销满减明细表 (PromoMj)
 */
@Entity('goods_promo_mj')
export class GoodsPromoMjEntity extends BaseEntity {
  @Index()
  @Column({ comment: '单据ID (Oracle)', length: 50 })
  billNo: string;

  @Column({ comment: '单据序号 (Oracle)', nullable: true, default: 0 })
  billSn: number;

  @Column({ comment: '企业ID (Oracle)', length: 50, nullable: true })
  entId: string;

  @Column({ 
    comment: '含税金额 (Oracle)', 
    type: 'decimal', 
    precision: 12, 
    scale: 6, 
    nullable: true, 
    default: 0 
  })
  taxAmount: number;

  @Column({ 
    comment: '扣率 (Oracle)', 
    type: 'decimal', 
    precision: 12, 
    scale: 6, 
    nullable: true, 
    default: 0 
  })
  dedRate: number;

  @Index()
  @Column({ comment: '状态 0-禁用 1-启用', default: 1 })
  status: number;
} 